﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BankSystem.Forms
{
    public partial class MainForm : Form
    {
        ParentForm parentForm;

        public MainForm(ParentForm form)
        {
            InitializeComponent();

            this.MdiParent=form;
            this.parentForm = form;
            WindowState = FormWindowState.Normal;
            MaximizeBox = false;
            Dock = DockStyle.Fill;
        }

        public void setATMid(string id)
        {
            labelATMid.Text = "ATM id : "+id;
        }

        private void buttonSave_Click(object sender, EventArgs e)
        {
            parentForm.jumpToStoreForm(this);
        }

        private void buttonWithdraw_Click(object sender, EventArgs e)
        {
            parentForm.jumpToWithdrawForm(this);
        }

        private void buttonShowBalance_Click(object sender, EventArgs e)
        {
            parentForm.jumpToBalanceForm(this);
        }

        private void buttonExit_Click(object sender, EventArgs e)
        {
            parentForm.Exit();
            parentForm.jumpToLoginForm(this);
        }
    }
}
